/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package it.tukano.fun;

/**
 * A 4 elements' tuple
 * @author utente3
 */
public class Tuple4<A,B,C,D> {

    /**
     * Returns a new Tuple4
     * @param <A> the type of the first element
     * @param <B> the type of the second element
     * @param <C> the type of the third element
     * @param <D> the type of the fourth element
     * @param a the first value
     * @param b the second value
     * @param c the third value
     * @param d the fourth value
     * @return a new Tuple4
     */
    public static <A, B, C, D> Tuple4<A, B, C, D> newInstance(A a, B b, C c, D d) {
        return new Tuple4<A, B, C, D>(a, b, c, d);
    }

    private final A a;
    private final B b;
    private final C c;
    private final D d;

    /**
     * Initializes this tuple
     * @param a the first value
     * @param b the second value
     * @param c the third value
     * @param d the fourth value
     */
    public Tuple4(A a, B b, C c, D d) {
        this.a = a;
        this.b = b;
        this.c = c;
        this.d = d;
    }

    /**
     * Returns the first value
     * @return the first value
     */
    public A getA() {
        return a;
    }

    /**
     * Returns the second value
     * @return the second value
     */
    public B getB() {
        return b;
    }

    /**
     * Returns the third value
     * @return the third value
     */
    public C getC() {
        return c;
    }

    /**
     * Returns the fourth value
     * @return the fourth value
     */
    public D getD() {
        return d;
    }
}
